home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Dynamic Bu22180742001.psc / Modules / modApi.bas next >
Encoding:
BASIC Source File  |  2001-07-04  |  1.0 KB  |  33 lines

  1. Attribute VB_Name = "modApi"
  2. Type POINTAPI
  3.     X As Long
  4.     Y As Long
  5. End Type
  6.  
  7. Public Const SW_SHOWNOACTIVATE = 4
  8.  
  9. Public old_HWND                         As Long
  10. Public new_HWND                         As Long
  11. Public FColor                           As Long
  12.  
  13. Declare Function GetActiveWindow Lib "User32" () As Long
  14. Declare Function GetCursorPos Lib "User32" (lpPoint As POINTAPI) As Long
  15. Declare Function WindowFromPoint Lib "User32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
  16. Declare Function ShowWindow Lib "User32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
  17. Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  18.  
  19. Sub PopDownAll()
  20. Dim ctl As Control
  21. Dim ctl_hWnd As Long
  22. Dim txt As String
  23.     ' Find the control with the given hWnd.
  24.     On Error Resume Next
  25.     For Each ctl In Parent.Controls
  26.             If ctl.Tag = "AutoButton" Then
  27.              ctl.PopDown
  28.             End If
  29.     Next ctl
  30.  
  31. End Sub
  32.  
  33.